{template "info","header"}
<header class="am-topbar admin-header">
  <div class="am-topbar-brand">
    <strong>DOM</strong> <small>超级作文本文档对象模型</small>
  </div>
</header>
<div class="am-g">
	<div class="am-u-lg-6 am-u-md-8 am-u-sm-centered">

		<hr>
		<h2>{L('member').L('login')}</h2>

		<form class="am-form" method="post" action="" onsubmit="save_username();" id="myform" name="myform">
			<input type="hidden" name="forward" id="forward" value="{$forward}">
			<label for="username">用户名:</label>
			<input type="text" name="username" id="username" value="" minlength="5" placeholder="输入用户名（至少 5 个字符）" required/>
			<br>
			<label for="password">密码:</label>
			<input type="password" name="password" id="password" value="" minlength="3" placeholder="请输入密码（至少 3 个字符" required/>
			<br>
			<label for="code">验证码:</label>
			<br>
			<div style="width: 350px;" class="am-fl"><input type="text" name="code" id="code" value=""  minlength="4" placeholder="输入验证码（至少 4 个字符）" required ></div><div class="am-fr">{form::checkcode('code_img', '5', '14', 200, 40)}</div>
			<br><br>
			<label for="remember-me">
				<input type="checkbox" name="cookietime" value="2592000" id="cookietime"> {L('remember')}{L('username')}
			</label>
			<br />

			<div class="am-cf">
				<input type="submit" name="dosubmit" id="dosubmit" value="{L('login')}" class="am-btn am-btn-primary am-btn-sm am-fl">
				<input type="button" value="{L('register')}" onclick="redirect('{APP_PATH}index.php?m=member&c=index&a=register&siteid={$siteid}')" class="am-btn am-btn-success am-btn-sm am-fl">
				<input type="submit" name="" value="忘记密码 ^_^? " class="am-btn am-btn-default am-btn-sm am-fr">
			</div>
		</form>
		<hr>
		<h3>快捷登录</h3>
		<div class="am-btn-group">
			<a href="#" class="am-btn am-btn-secondary am-btn-sm"><i class="am-icon-qq am-icon-sm"></i> QQ登录</a>
			<a href="#" class="am-btn am-btn-success am-btn-sm"><i class="am-icon-weixin am-icon-sm"></i> Wechat微信</a>
			<a href="#" class="am-btn am-btn-primary am-btn-sm"><i class="am-icon-weibo am-icon-sm"></i> 新浪微博</a>
		</div>
	</div>
</div>
<script type="text/javascript" src="{JS_PATH}cookie.js"></script>
<script type="text/javascript" src="{JS_PATH}member_common.js"></script>
<script type="text/javascript" src="{JS_PATH}dialog.js"></script>

<script language="JavaScript">

	function save_username() {
		if($('#cookietime').attr('checked')==true) {
			var username = $('#username').val();
			setcookie('username', username, 3);
		} else {
			delcookie('username');
		}
	}
	var username = getcookie('username');
	if(username != '' && username != null) {
		$('#username').val(username);
		$('#cookietime').attr('checked',true);
	}

</script>
{template "info","footer"}


